home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / ffg155.zip / UTIL_BAT.ZIP / DIREXIST.BAT < prev    next >
DOS Batch File  |  1993-10-31  |  861b  |  29 lines

  1. @echo off
  2. ::
  3. ::  This batch file uses FFG to for existence of a specified directory.  If it
  4. ::  exists a message saying so is displayed.  Similarly, a message
  5. ::  states that the directory does not exist if it is not found.  It will
  6. ::  find hidden directories too.
  7. ::
  8. ::
  9. :: Notes on FFG parameters:
  10. :: 1. /q suppresses normal FFG output
  11. :: 2. /r prevents searching beyond the specified directory
  12. :: 3. /1 stops after first find to avoid unnecessary searching
  13. ::
  14. :: %1 holds the directory to find, which must have a terminating backslash
  15. ::
  16. if %1.==. goto USAGE
  17.   ffg /q /r /1 %1
  18. if errorlevel 1 if not errorlevel 2 goto FOUND
  19.   echo Directory "%1" doesn't exist.
  20.   goto END
  21. :FOUND
  22.   echo Directory "%1" exists.
  23.   goto END
  24. :USAGE
  25.   echo USAGE:  %0 FullDirSpec\
  26.   echo.
  27.   echo         Note: You must use a trailing backslash '\'
  28. :END
  29.